﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LeetCodeSolutions
{
    /// <summary>
    /// 1431. 拥有最多糖果的孩子
    /// </summary>
    class LeetCode1431: LeetCodeBase
    {
        public override void Execute()
        {
            throw new NotImplementedException();
        }

        public IList<bool> KidsWithCandies(int[] candies, int extraCandies)
        {
            List<int> candiesList = candies.ToList();
            IList<bool> candiesExtraList = new List<bool>();
            int max = candiesList.Max();
            for (int i = 0; i < candiesList.Count; i++)
            {
                int newNums = candiesList[i] + extraCandies;
                candiesExtraList.Add(newNums >= max);
            }

            return candiesExtraList;
        }
    }
}
